Skip to content

fix: skip coverage grade comment on fork PRs - #14299

Merged
DaanHoogland merged 2 commits into
apache:mainfrom
PrashantBhanage:fix/sonar-check-workflow
Oct 21, 2026
Merged

DaanHoogland merged 2 commits into
apache:mainfrom
PrashantBhanage:fix/sonar-check-workflow

Conversation

@PrashantBhanage

@PrashantBhanage PrashantBhanage commented Oct 3, 2026 •

Copy link
Copy Markdown

Description

This PR skips the "Post Coverage Grade Comment on PR" step on fork PRs. On forks the token is read-only, so posting the comment fails with a 403. The step now uses the same condition as the "Upload to SonarQube" step.

It also falls back to N/A when branch coverage is not available.

This change was separated from #13490 as requested by @DaanHoogland.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

N/A

How Has This Been Tested?

Checked the diff against apache:main. Only .github/workflows/sonar-check.yml changes. No application code or unit tests were changed.

How did you try to break this feature and the system with this change?

On fork PRs the comment step is now skipped, so it no longer tries to post with the read-only token. Fork PRs will not get a coverage comment. On PRs from the main repo the step runs as before.

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

Comment thread .github/workflows/sonar-check.yml Outdated
Comment thread .github/workflows/sonar-check.yml Outdated
@PrashantBhanage PrashantBhanage changed the title fix: skip coverage grade comment when grade unavailable fix: skip coverage grade comment on fork PRs Oct 19, 2026
@DaanHoogland

Copy link
Copy Markdown
Contributor

ci only, might just merge (despite what @andrijapanicsb or anybody says) if GHA pass.

@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 20.40%. Comparing base (1a48a87) to head (57a2c41).
⚠️ Report is 45 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14299      +/-   ##
============================================
+ Coverage     19.91%   20.40%   +0.48%     
- Complexity    20199    21285    +1086     
============================================
  Files          6373     6481     +108     
  Lines        577230   588040   +10810     
  Branches      70696    72021    +1325     
============================================
+ Hits         114950   119962    +5012     
- Misses       449713   455057    +5344     
- Partials      12567    13021     +454     
Flag Coverage Δ
uitests 3.70% <ø> (-0.01%) ⬇️
unittests 21.70% <ø> (+0.51%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DaanHoogland
DaanHoogland merged commit 1abb539 into apache:main Oct 21, 2026
27 of 28 checks passed
@DaanHoogland DaanHoogland added this to the 24.0 milestone Oct 21, 2026
@boring-cyborg

boring-cyborg Bot commented Oct 21, 2026

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants